package com.szrt.java.day20161226.demo06;

import java.util.Scanner;

/**
 * A 优秀
 * B 良好
 * C 一般
 * D 有问题
 * @author zsrt
 *
 */
public class SwitchDemo {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入你的等级，如：A B C D");
		String next = sc.next();
		sc.close();
		
		String result = check(next);
		System.out.println(result);
		
	}
	
	public static String check(String score){

		String result = "";
		
		switch (score) {
			case "A":result="优秀"; break;
			case "B":result="良好"; break;
			case "C":result="一般"; break;
			case "D":result="有问题"; break;
		    default:result="输入数据有误！"; break;
		}
		return result;
	}
	
}
